// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.205.2/containers/docker-existing-dockerfile
{
	"name": "Zephyr Development Environment Dockerfile",

	"build": {
		// Update the 'dockerfile' property if you aren't using the standard 'Dockerfile' filename.
		"dockerfile":"../Dockerfile",

		// Sets the run context to one level up instead of the .devcontainer folder.
		"context": "..",

		"args": {
			// Uncomment the following section if your host machine silicon is ARM64
			// "HOST_ARCH":"aarch64",
			"USER": "vscode",
			"UID": "1000"
		}
	},

	// Create environment variables available to VSCode, but not the container.
	"remoteEnv": {
		"hostWorkspaceFolder":"${localWorkspaceFolder}"
	},

	// Set *default* container specific settings.json values on container create.
	"settings": {
		"devicetree.defaultBoard": "stm32f401vc_disco"
	},

	// Add the IDs of extensions you want installed when the container is created.
	"extensions": [
		"ms-vscode.cpptools",
		"ms-vscode.cpptools-extension-pack",
		"amiralizadeh9480.cpp-helper",
		"twxs.cmake",
		"ms-python.python",
		"eamodio.gitlens",
		"streetsidesoftware.code-spell-checker",
		"streetsidesoftware.code-spell-checker-russian",
		"spmeesseman.vscode-taskexplorer",
		"shardulm94.trailing-spaces",
		"ms-vscode.vscode-serial-monitor",
		"trond-snekvik.devicetree"
	],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Uncomment the next line to run commands after the container is created - for example installing curl.
	// "postCreateCommand": "apt-get update && apt-get install -y curl",

	// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
	// Uncomment the following section if your host machine is running Linux
	"runArgs": [
		"--device=/dev/bus/usb/"
	],

	// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
	// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],

	// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "vscode"
}
